/**
  ETFRoot project, Anyang Normal University && IMP-CAS
  \class ETFTstop4
  \brief a plastic scintillator (square) plate with its four corners each coupled
  with a PMT, usually for cosmic-ray tests
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2022-04-25
  \date 2021-04-25 last modified
  \attention
  changelog
  <table>
  <tr>  <th>Date         <th>Author      <th>Description                   </tr>
  <tr>  <td>2022-04-25   <td>Asia Sun    <td>file created                  </tr>
  </table>

  \copyright Copyright (c) 2021 Anyang Normal U. && IMP-CAS with LGPLv3 LICENSE
*/

#ifndef ETFTstop4_h
#define ETFTstop4_h

#include "ETFTimer.h"

class ETFTstop4 : public ETFTimer{
public:
  ETFTstop4() : ETFTimer(){}
  ETFTstop4(const char *name);

  virtual ~ETFTstop4(){}

  virtual void Assign(const ETFHPTDCChannel *ch); ///< add the data channel to the detector

  virtual double GetTime() const; ///< extract the timing data of the detector
  virtual int GetFiredStatus() const; ///< \retval fHits[0]->GetFiredStatus()
  virtual void ConstructGraph(); ///< add strip to fGDumb
  virtual void DrawHits(); ///< draw the hits

  ClassDef(ETFTstop4, 1);

protected:
  /// \param stripId: 0-30, along x increasing direction
  /// \param vh: 0-1: v, h
  virtual void AddHit(const ETFHPTDCChannel *ch, int idvh);
};

#endif
